<?php



namespace App\Listeners\CategoryUpdateEvent;

use App\Events\CategoryUpdateEvent;
use App\Zesow\Cache\Impl\CateogryCache;

class CacheClearListener
{

    private $cateogryCache;

    public function __construct(CateogryCache $categoryCache)
    {
        $this->cateogryCache = $categoryCache;
    }

    public function handle(CategoryUpdateEvent $event)
    {
        $this->cateogryCache->destroy();
    }
}
